<template>
  <div class="not-container">
    <img src="@/assets/images/404.png" class="not-img" alt="404" />
    <div class="not-detail">
      <h2>{{ status }}</h2>
      <h4>{{ title }}🤷‍♂️🤷‍♀️</h4>
      <el-button type="primary" @click="router.back" v-show="isBack"> 返回上一页 </el-button>
    </div>
  </div>
</template>

<script setup lang="ts" name="404">
import { useRouter } from "vue-router";
const router = useRouter();

defineProps({
  isBack: {
    type: Boolean,
    default: true
  },
  title: {
    type: String,
    default: "抱歉，您访问的页面不存在~"
  },
  status: {
    type: Number || String,
    default: 404
  }
});
</script>

<style scoped lang="scss">
@import "./index.scss";
</style>
